#!/usr/bin/python
# -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url
from django.views.generic.simple import direct_to_template

from researchSNS import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'researchSNS.views.home', name='home'),
    # url(r'^researchSNS/', include('researchSNS.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),

    # Static Page Settings
    (r'^css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'e:/eclipse_workspace/researchSNS/css'}),
    (r'^js/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'e:/eclipse_workspace/researchSNS/js'}),
    (r'^image/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'e:/eclipse_workspace/researchSNS/image'}),
    (r'^user_image/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'e:/eclipse_workspace/researchSNS/user_image'}),
    (r'^group_image/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'e:/eclipse_workspace/researchSNS/resources/group_image'}),
	
    (r'^download/(\d+)/$', 'researchSNS.Group.views.download'),
	#(r'^test_search/$', 'researchSNS.test_whoosh.views.t_search'),
	#(r'^upload/$', 'researchSNS.Group.views.upload_file'),
	#(r'^down_file/(.+/.+)/$', 'researchSNS.Group.views.down_file'),
	#(r'^down/$', 'researchSNS.Group.views.down_'),
	#(r'^download/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'c://', 'show_indexes':True}), 

    # Login, Register and Home
	(r'^$', 'researchSNS.SNS.views.login'),
    (r'^login/$', 'researchSNS.SNS.views.login'),
	(r'^logout/$', 'researchSNS.SNS.views.logout'),
    (r'^register/$', 'researchSNS.SNS.views.register'),
    (r'^register/more/$', 'researchSNS.SNS.views.register_more'),
    (r'^fresh_department/$', 'researchSNS.SNS.views.fresh_department'),
    (r'^home/$', 'researchSNS.SNS.views.show_home'),
    (r'^people/(\d+)/$', 'researchSNS.SNS.views.show_personal_page'),
    (r'^people/(\w+)/$', 'researchSNS.SNS.views.show_personal_page'),
    (r'^new_mail/$', 'researchSNS.SNS.views.new_mail'),

    
    
    # Group Application Pages
    (r'^group/', include('researchSNS.Group.urls')),
    #QA Pagesurl
    (r'^qa/', include('researchSNS.QA.urls')),
                       
    # Test Page
    (r'^test$', 'researchSNS.SNS.views.test'),
    (r'^about/$', 'researchSNS.SNS.views.show_about'),
    (r'^contact/$', 'researchSNS.SNS.views.show_contact'),
    
	# bug report
	(r'^bugreport/$', 'researchSNS.views.bugreport'),
	
	
    # all 404 error will redrict to this page
    (r'/$', 'researchSNS.views.http404'),
)
